package opreation.impl;

import book.BookList;
import opreation.IOperation;

//下架书籍
public class DeleteOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.print("请输入要删除书籍：");
        String name = scanner.next();
        if(bookList.contains(name)){
            //调用书架类下架函数
            System.out.println("删除成功");
            bookList.delBook(name);
        }else{
            System.out.println("您要删除的书籍不存在！");
        }
    }
}
